{% extends 'base.html' %}
{% import "bootstrap/wtf.html" as wtf %}
{% import "_macros.html" as macros %}
{% import "_my_wtf_macros.html" as my_wtf_macros %}

{% block title %}万屏时代OPC--金银牌产品类型{% endblock %}
{% block panel_heading %}
    万屏时代OPC--金银牌产品类型
    <div class="pull-right btn-group">
        <a href="{{ url_for('enterprise_bp.product_type_add') }}" class="btn btn-xs btn-success"
        style="margin-right: 5px" target="_blank">
            新建产品类型
        </a>
    </div>
{% endblock %}

{% block panel_body %}
    {% if pagination %}
    <div class="pagination">
        {{ macros.pagination_widget(pagination, 'enterprise_bp.product_type_list') }}
    </div>
    {% endif %}
    <table class="table table-bordered table-hover table-condensed table-striped">
        <thead>
            <tr>
                <th>ID</th>
                <th>产品类型</th>
                <th>创建时间</th>
                <th>更新时间</th>
                <th>操作</th>
            </tr>
        </thead>
        <tbody>
        {% for i in items %}
            <tr>
                <td>{{ i.id }}</td>
                <td>{{ i.name }}</td>
                <td>{{ i.created_datetime }}</td>
                <td>{{ i.updated_datetime }}</td>
                <td>
                    <a class="btn btn-xs btn-primary"
                       href="{{ url_for('enterprise_bp.product_type_edit', type_id = i.id) }}"
                       target="_blank"
                    >编辑
                    </a>
                </td>
            </tr>
        {% endfor %}
        </tbody>
    </table>
    {% if pagination %}
    <div class="pagination">
        {{ macros.pagination_widget(pagination, 'enterprise_bp.product_type_list') }}
    </div>
    {% endif %}
{% endblock %}